package nl.hr.minor.mobilelife.j1213.jlr.findit;

import nl.hr.minor.mobilelife.j1213.jlr.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

/**
 * Activity to display the score list of the FindIT game.
 * @author Leon
 *
 */
public class HighScores extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.findit_highscores);
		
		// Fetch the TextView from the layout, so we can put our score string into it
		TextView textView = (TextView) findViewById(R.id.scores);
		
		// create a database object to retrieve all scores
		Database database = new Database(this);
		database.open();
		String data = database.getData();
		database.close();
		
		// put the result into the textview
		textView.setText(data);
	}
}
